import {createStore,applyMiddleware,combineReducers} from "redux"
import thunk from "redux-thunk"
import countReducer from "./reducers/countReducer"
import zanReducer from "./reducers/zanReducer"
//创建store 状态 仓库 对象
//  1.存什么数据(init)  2. 怎么改数据(action)  行为 /动作
// action  是一个对象   {type:"",payload:}
// {type:"打",payload:"酱油"}
// {type:"讲",payload:"redux"}
// {type:"改",payload:"2"}

// 合并reducers
let reducer = combineReducers({
    count:countReducer,
    zan:zanReducer
})   //  reducer  返回的是一个对象


let store = createStore(reducer,applyMiddleware(thunk));

export default store;



